﻿using System.Collections.Generic;
using System;
namespace Douban.Core.Menus
{
    public interface IMenuManager
    {
        void Add(MenuItem item);
        void Remove(MenuItem item);
        IEnumerable<MenuItem> GetMenuItems();
        event MenuChangedEventHandler MenuChanged;
    }

    public delegate void MenuChangedEventHandler(object sender, MenuChangedEventArgs e);

    public enum MenuAction
    {
        Add,
        Remove
    }

    public class MenuChangedEventArgs : EventArgs
    {
        public MenuAction MenuAction { get; set; }
        public MenuItem Menu { get; set; }

        public MenuChangedEventArgs(MenuAction menuAction, MenuItem menu)
        {
            MenuAction = menuAction;
            Menu = menu;
        }
    }
}
